<template>
    <div class="slideimg">
        <!-- <van-swipe :autoplay="3000"> -->
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item v-for="(image, index) in images" :key="index" >
                <img :src="image" @click="fun(index)"/>
            </van-swipe-item>
        </van-swipe>
       
    </div>
</template>

<script>
export default {
    data() {
    return {
      images: [
        "https://brup.shengri.cn/goods/2021/04/FqSX6EavX8WGKaiVEKC2jfW26x6n.jpg",
        "https://brup.shengri.cn/goods/2021/04/FgRveJ2PaFzmk85dUQwSfRi6TYhk.png",
        "https://brup.shengri.cn/goods/2021/04/Fnh8qtnl6gpSgsBT3Hob0-c2pKQW.jpg",
        "https://brup.shengri.cn/goods/2021/04/FuEwjp2RKPGXZq31lkqM02lAyg1C.jpg",
        "https://brup.shengri.cn/goods/2021/04/FkAS-eTxlhpIhRNhpTRdvy9whfQW.jpg",
        "https://brup.shengri.cn/goods/2021/04/Fu_ZY0DpdUaPV1IXcfLiK0TQKpGM.jpg",
        "https://brup.shengri.cn/goods/2021/03/FrbhAAUWpBkCvTSkxEi-IOPMSoAp.jpg",
        "https://brup.shengri.cn/goods/2020/07/FhduSbsnlZiAfl-EwrlP0wd-5ygH.jpg",
        "https://brup.shengri.cn/goods/2020/11/Fio69O17zoLXsx-YoVet8K5Cbvgs.jpg"
      ],
    };
  },
   methods:{
       fun(index){
           switch(index){
               case 0:this.$router.push("/sliderinfo");break;
               case 1:this.$router.push("/sliderinfo1");break;
               case 2:this.$router.push("/sliderinfo2");break;
               case 3:this.$router.push("/sliderinfo3");break;
               case 4:this.$router.push("/sliderinfo");break;
               case 5:this.$router.push("/sliderinfo1");break;
               case 6:this.$router.push("/sliderinfo2");break;
               case 7:this.$router.push("/sliderinfo3");break;
               case 8:this.$router.push("/sliderinfo");break;
           }
       }
   }
}   



</script>

<style scoped>
    .slideimg{
        width: 100%;
        height: 1.6rem;
        font-size: 0.12rem;
    }
    .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
  }
    .my-swipe{
        width: 100%;
        height: 100%;
    }
    img{
        width: 100%;
        height: 100%;
    }
</style>    